using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using Framework.Interface;

namespace Game.System
{
    public class SystemFactory
    {
        private List<ISystem> systems = new();

        public void RegisterSystems()
        {
            systems.Add(AccountSystem.Instance);
        }

        public async UniTask Initialize()
        {
            for (int i = 0; i < systems.Count; i++)
            {
                await systems[i].Initialize();
            }
        }

        public void Shutdown()
        {
            for (int i = 0; i < systems.Count; i++)
            {
                systems[i].Shutdown();
            }
        }
    }
}
